package com.situ.boot.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "useroperation", schema = "brcc", catalog = "")
public class UseroperationEntity {
    private int oid;
    private Integer uid;
    private String operation;
    private Timestamp optime;

    @Id
    @Column(name = "oid")
    public int getOid() {
        return oid;
    }

    public void setOid(int oid) {
        this.oid = oid;
    }

    @Basic
    @Column(name = "uid")
    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    @Basic
    @Column(name = "operation")
    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    @Basic
    @Column(name = "optime")
    public Timestamp getOptime() {
        return optime;
    }

    public void setOptime(Timestamp optime) {
        this.optime = optime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UseroperationEntity that = (UseroperationEntity) o;
        return oid == that.oid &&
                Objects.equals(uid, that.uid) &&
                Objects.equals(operation, that.operation) &&
                Objects.equals(optime, that.optime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(oid, uid, operation, optime);
    }
}
